package net.lesscoding.shop.remote;

import net.lesscoding.shop.common.Result;
import net.lesscoding.shop.entity.Goods;
import net.lesscoding.shop.entity.GoodsNumberLog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author eleven
 * @date 2024/6/14 9:14
 * @apiNote
 */
@FeignClient(name = "shop-goods-service")
@RequestMapping("/goods")
public interface GoodsFeignService {

    @PostMapping("/reduceGoodsNum")
    Result reduceGoodsNum(@RequestBody GoodsNumberLog goodsLog);

    @GetMapping("/{goodsId}")
    Result<Goods> getById(@PathVariable("goodsId") Long goodsId);
}
